export const getApiDailyStats = async (req, res) => {
    try {
        const { startDate, endDate, userId } = req.query
        console.log("req.query",req.query)
        // 这里添加实际的业务逻辑，例如从数据库获取数据
        // 以下是模拟数据
        const responseData = {
            totalRequests: 2450,
            successRate: 99.2,
            avgResponseTime: 156,
            topApis: [
                { apiPath: "/user-info", count: 1200 },
                { apiPath: "/order-info", count: 850 }
            ]
        }

        res.status(200).json({
            code: 200,
            data: responseData,
            msg:""
        })
    } catch (error) {
        console.error('Error in getApiDailyStats:', error)
        res.status(500).json({ error: '服务器内部错误' })
    }
}